package com.li.shop.service;

import com.li.shop.domain.Product;
import com.li.shop.domain.ProductExample;
import com.li.shop.domain.ProductPic;
import com.li.shop.utils.SearchProductResponse;
import com.li.shop.utils.SearchProductdictionaryidResponse;

import java.util.List;

public interface ProductService {

    //通过商品名查询出product的集合
    List<Product> findByProductName(String productName);
    //查询全部商品
    List<Product> listAll();
    //根据id查询一个商品
    Product selectByPrimaryKey(String id);
    //更新
    int update(Product product);
    //关联查询
    List<Product> selectByExample(ProductExample example);
    //根据商品价格排序
    List<Product> sortByPrice(String searchContent);
    //根据商品销量排序
    List<Product> sortBySalesVolume(String searchContent);
    //用于更新商品销量
    void updateSalesVolume(String productId,Integer salesVolume);


    //查询全部商品
    List<Product> listAll(String productName);
    List<Product> list(String dId);
    List<Product> list();
    List<Product> getAll();
    int saveProduct(Product product);
    Product getpId(String pId);
    void add(Product product);
    SearchProductResponse listUser(Integer pageSize, Integer pageNum, String keyword);
    int delete(String pId);
    SearchProductdictionaryidResponse listUser2(Integer pageSize, Integer pageNum, String dictionaryid);
    int  updatename(Product product);

    List<Product> selectAndcollect();
    List<Product> rexiao(String phname);

    List<Product> findalllike(String pname);
}
